<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>会员充值</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no">
<link rel="stylesheet" type="text/css" href="/xj/Public/s/lanren.css">
</head>
<body>
<div class="wenx_xx">
	<div class="mz">充值</div>
	<div class="wxzf_price">￥{$total_fee}</div>
</div>
<div class="skf_xinf">
	<div class="all_w"> <span class="bt">收款方</span> <span class="fr">嘛嘛公寓</span> </div>
</div>
<a href="javascript:void(0);" class="ljzf_but all_w" onclick="callpay();">立即支付</a> 
</body>
<script type="text/javascript">
	//调用微信JS api 支付
	function jsApiCall(){
		WeixinJSBridge.invoke(
			'getBrandWCPayRequest',
			<?php echo $jsApiParameters; ?>,
			function(res){
				WeixinJSBridge.log(res.err_msg);
				alert(res.err_code+res.err_desc+res.err_msg);
			}
		);
	}

	function callpay(){
		if (typeof WeixinJSBridge == "undefined"){
			if( document.addEventListener ){
				document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
			}else if (document.attachEvent){
				document.attachEvent('WeixinJSBridgeReady', jsApiCall); 
				document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
			}
		}else{
			jsApiCall();
		}
	}
</script>
</html>